<?php
if(!$Session->check_admin()) redirect('index.php');
require_once IMMOPHP_ROOT_PATH.'plugins/Page/lang/fr.php';
require_once IMMOPHP_ROOT_PATH.'plugins/Page/inc/Page.class.php';
if(!$id = retrieve('GET','page',true)) redirect('index.php');
$Page = $db->sql_query("SELECT * FROM immo_page WHERE id = '". $id ."'",'OBJECT');
if($db->nb_resultat == 0) redirect('index.php');

$template->set_filenames(array('edition' => 'plugins/Page/template/edition.tpl'));
$template->assign_vars(array(
'L_CONTENUE'    =>  $lang['Contenue'],
'L_NOM' =>  $lang['Nom'],
'L_GESTION_DES_PAGES'   =>  $lang['Gestion_des_pages'],
'L_EDITION_PAGE'    =>  $lang['Edition_page'],
'L_ENREGISTRER' =>  $lang['Enregistrer'],
'V_ID'  =>  $Page->id,
'V_NAME'    =>  $Page->name,
'V_ZONE_CONTENUE'    =>  get_ckeditor('contenue',stripslashes($Page->contenue)),
));
$template->display('edition');
?>
